#include<iostream>
#include<memory>
#include"ThreadPool.hpp"
#include"Task.hpp"

int main()
{
    // std::unique_ptr<ThreadPool<Task>> tp(new ThreadPool<Task>());
    // tp->Start();
    ThreadPool<Task>::GetInstance()->Start();
    srand((uint64_t)time(nullptr)^getpid());
    while(true)
    {
        int x=rand()%100+1;
        int y=rand()%200;
        char op=opers[rand()%opers.size()];
        usleep(1234);
        Task t(x,y,op);
        ThreadPool<Task>::GetInstance()->Push(t);
    }
    ThreadPool<Task>::GetInstance()->Wait();
    return 0;
}